﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Hybrid;

namespace Hybrid
{
    class KeySet
    {
        private List<Keys> privateKeySet;
        private List<bool> privateBools = new List<bool>() { false, false, false, false, false };


        public KeySet(int PlayerAmount, int PlayerIndex)
        {
            List<Keys> KeySet1 = new List<Keys>() { Keys.Left, Keys.Right, Keys.Up, Keys.Down };
            List<Keys> KeySet2 = new List<Keys>() { Keys.A, Keys.D, Keys.W, Keys.S };
            List<Keys> KeySet3 = new List<Keys>() { Keys.J, Keys.L, Keys.I, Keys.K };

            if (PlayerAmount == 0)
            {
                privateKeySet = KeySet1;
                privateKeySet.Add(Keys.Space);
            }
            else if (PlayerAmount == 1)
            {
                if (PlayerIndex == 0)
                {
                    privateKeySet = KeySet2;
                    privateKeySet.Add(Keys.Z);
                }
                else if (PlayerIndex == 1)
                {
                    privateKeySet = KeySet1;
                    privateKeySet.Add(Keys.PageDown);
                }
            }
            else if (PlayerAmount == 2)
            {
                if (PlayerIndex == 0)
                {
                    privateKeySet = KeySet2;
                    privateKeySet.Add(Keys.Z);
                }
                else if (PlayerIndex == 1)
                {
                    privateKeySet = KeySet3;
                    privateKeySet.Add(Keys.H);
                }
                else if (PlayerIndex == 2)
                {
                    privateKeySet = KeySet1;
                    privateKeySet.Add(Keys.PageDown);
                }
            }
        }

        public List<Keys> GetKeySet
        {
            get
            {
                return privateKeySet;
            }
        }

        public List<bool> Bools
        {
            get
            {
                return privateBools;
            }
        }

    }
}
